<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        template="template.xhtml">
	<ui:define name="title">Welcome</ui:define>
    <ui:define name="content">
        <div class="content ui-widget ui-widget-content ui-corner-all">
            <h2>Welcome</h2>
            <p>Welcome to Photobook, the online photobook to store, organize, view and share your personal photos!</p>
            <h:form>
                <p:dataTable id="photos" var="photo" value="#{photoBean.photos}">
                    <p:column headerText="ID">
                        <h:outputText value="#{photo.id}" />
                    </p:column>
                    <p:column headerText="Photo">
                        <h:graphicImage value="thumbnail/#{photo.id}" />
                    </p:column>
                </p:dataTable>
                <br />
                <p:fileUpload label="Upload photo" fileUploadListener="#{photoBean.handleFileUpload}" auto="true" update="photos" />
            </h:form>
        </div>
    </ui:define>
</ui:composition>
